1. Field of the Invention
The present invention relates to an apparatus and method for controlling memory, and more particularly, to a memory control apparatus and a method for controlling memory access by which a desirable page mode is selected to reduce memory access time.
2. Description of the Related Art
Information computing systems primarily utilize bus systems on which various functional blocks communicate data and control signals. In a system-on-chip (SOC) design in which various Internet protocol (IP) blocks are integrated on a single semiconductor chip, the IP blocks are generally connected with each other using bus systems. In a typical SOC system, the various IP blocks can be classified as bus masters, bus slaves, or system arbiters, etc.
A memory controller is an example of a bus slave and is important in the SOC system. The plurality of bus masters can independently access an external memory chip of the SOC system through the memory controller.
FIG. 1 is a schematic diagram of an interface between an external memory with a SOC system. Generally, a SOC system 100 includes a plurality of bus masters 111, 112 and 113, a bus 114, and a plurality of bus slaves (not shown). The memory controller 121 is used as an example of a bus slave.
The memory controller 121 arbitrates memory access to an external memory 130 by the plurality of bus masters 111, 112 and 113, which are connected to the bus 114 of the SOC system 100. That is, each of the bus masters 111, 112 and 113 can independently access the external memory 130 of the SOC system 100 through the memory controller 121.
The procedure for accessing the external memory 130 includes a precharge operation, a row access operation, a column access operation, and a refresh operation. The mode in which the memory 130 is paged is categorized into an open page mode and a closed page mode according to the starting time of the precharge operation of the memory 130. Thus, memory access times associated with the open and closed page modes are different from each other.
FIG. 2 illustrates the relationship between the respective page modes and the memory access time. If a page hit occurs in the open page mode, only the column access operation with respect to an active row among the four access operations of the memory 130 is performed. If a page miss occurs in the open page mode, all of the four operations are performed.
The precharge operation is performed in the closed page mode immediately after the memory access is completed. The row access operation and the column access operation are preformed irrespective of whether a page hit or a page miss occurs in the closed page mode. As can be seen in FIG. 2, in the case where the page hit occurs in the open page mode, the memory access time is reduced, and in the case where the page miss occurs in the closed page mode, the memory access time is reduced.
As shown in FIG. 2, α represents precharge time, β represents row access time, and ↑ represents column access time. Supposing that h represents page hit ratio, the average memory access time in the open page mode is expressed as Equation 1 when the refresh operation is not considered:MemoryAccessTime=γh+(α+β+γ)(1−h)  (1)
On the other hand, the average memory access time in the closed page mode is expressed as Equation 2 when the refresh operation is not considered:MemoryAccessTime=β+γ  (2)
In order to reduce the memory access time in the open page mode as compared to that of the closed page mode, Equation 3 is obtained from Equations 1 and 2:
                    h        >                  α                      β            +            γ                                              (        3        )            
Conventionally, only one of the open page mode and the closed page mode can be selected at a time. However, if the page hit ratio is larger than a predetermined value
  (      α          β      +      γ        )obtained from Equation 3, in the case where the open page mode has already been selected, the memory access time is increased. In contrast, if the page hit ratio is smaller than the predetermined value
      (          α              β        +        γ              )    ,in a case where the closed page mode has already been selected, the memory access time is reduced.